package com.mzpai.product.enums;

public enum OrderStatusEnum {
	
	ORDER_STATUS_0("0","待付款"),
	ORDER_STATUS_1("1","待发货"),
	ORDER_STATUS_2("2","待自提"),
	ORDER_STATUS_3("3","已发货"),
	ORDER_STATUS_4("4","已完成"),
	ORDER_STATUS_5("5","已取消");
	
	private String code;
	private String title;

	OrderStatusEnum(String code, String title) {
		this.code = code;
		this.title = title;
	}

	public String getCode() {
		return code;
	}

	public String getTitle() {
		return title;
	}

	public static String getTitle(String code) {
		for (OrderStatusEnum obj : OrderStatusEnum.values()) {
			if (obj.getCode().equals(code)) {
				return obj.title;
			}
		}
		return null;
	}

}
